<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/layouts/template.xhtml">
	<ui:define name="body">
		<h:form id="form" acceptcharset="ISO-8859-1" enctype="multipart/form-data" target="_blank">
			<p:panel header="#{msgs['massai.report.sienge.header']}">

				<fieldset>
					<legend><h:outputText value="#{msgs['massai.report.quality.filter']}" /></legend>

					<h:panelGrid cellpadding="0" cellspacing="0">
						<h:panelGrid>
							<p:outputLabel value="#{msgs['massai.report.quality.accrualBasis']}" for="accrualBasis" />
							<p:inputMask required="true" requiredMessage="Competência #{msgs['common.required.field']}"
								mask="99/9999" id="accrualBasis" converter="accrualBasisConverter" style="width: 90px; text-align: right;"
								value="#{qualityReportBean.accrualBasis}" tabindex="1" validator="accrualBasisValidator" />
						</h:panelGrid>
					</h:panelGrid>

					<h:panelGrid>
						<p:outputLabel value="#{msgs['massai.report.quality.department']}" for="department" />
						<p:selectOneMenu required="true" requiredMessage="Departamento #{msgs['common.required.field']}"
							id="department" value="#{qualityReportBean.department}" style="width: 292px;" 
							label="#{msgs['massai.report.quality.department']}" tabindex="2" converter="entityConverter">
							<f:selectItems value="#{qualityReportBean.departments}" />
						</p:selectOneMenu>
					</h:panelGrid>
					
					<h:panelGrid>
						<p:outputLabel for="category" value="#{msgs['massai.report.quality.category']}" />
						<p:selectOneMenu 
							id="category" tabindex="3" value="#{qualityReportBean.category}"
							style="width: 292px;" label="#{msgs['massai.report.quality.category']}"
							converter="entityConverter">
							<f:selectItems value="#{qualityReportBean.listCategoryLevel()}" />
						</p:selectOneMenu>
					</h:panelGrid>
					
					<h:panelGrid style="margin: 10px 0 10px 0;">
						<h:panelGroup>
							<p:selectBooleanCheckbox tabindex="4" label="#{msgs['massai.report.quality.printoutInXLS']}" value="#{qualityReportBean.typeXLS}">
								<p:ajax event="change" global="false" />
							</p:selectBooleanCheckbox>
							<p:outputLabel value="#{msgs['massai.report.quality.printoutInXLS']}" style="padding: 0 0 3px 10px;" />
						</h:panelGroup>
					</h:panelGrid>

					<p:spacer height="10px"/>

					<h:panelGrid>
						<p:commandButton tabindex="5" value="#{msgs['common.printout']}"
							actionListener="#{qualityReportBean.printout()}" ajax="false" 
							style="margin-right: 5px;" styleClass="buttonSave" update=":form"
							rendered="#{sessionBean.showAction('reportYieldEfficiency', 'printout')}" />
					</h:panelGrid>
				</fieldset>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>